//
//  XHGoodsListCell.m
//  umbs
//
//  Created by 冷山 on 16/6/15.
//  Copyright © 2016年 冷山. All rights reserved.
//

#import "XHGoodsListCell.h"

@implementation XHGoodsListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.la_height.constant = 0.5;
}
- (IBAction)addAction:(id)sender
{
    if (self.ui_countLabel.text.integerValue<=98)
    {
        self.ui_countLabel.text=[NSString stringWithFormat:@"%ld" , self.ui_countLabel.text.integerValue+1];
    }
    if (self.ui_countLabel.text.integerValue>0) {
        self.ui_delButton.hidden=NO;
    }else
    {
        self.ui_delButton.hidden=YES;
    }
    [self.delegate cell:self addButtonAction:sender];

}
- (IBAction)deleteAction:(id)sender
{
    self.ui_countLabel.text=[NSString stringWithFormat:@"%ld" , self.ui_countLabel.text.integerValue-1];
    if (self.ui_countLabel.text.integerValue>0) {
        self.ui_delButton.hidden=NO;
    }else
    {
        self.ui_delButton.hidden=YES;
    }
    [self.delegate cell:self delButtonAction:sender];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
